package com.ss.android.article.base.feature.detail2.picgroup.a;

import android.app.Activity;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.ss.android.article.base.app.AppData;
import com.ss.android.article.base.feature.detail.model.ArticleInfo;
import com.ss.android.article.base.feature.detail2.widget.a.DetailAdTextLinkLayout;
import com.ss.android.article.base.feature.model.Article;

public final class b {
    public final Activity mActivity;
    public ViewGroup b;
    public DetailAdTextLinkLayout c;
    public TextView mSofaText;
    public View mContentsWrapper;
    public boolean isNightMode;
    public ArticleInfo mArticleInfo;
    private View mSofaLayout;

    public b(Activity activity, ViewGroup viewGroup, View arg5) {
        this.isNightMode = false;
        this.mActivity = activity;
        AppData.getInstance();
        this.isNightMode = AppData.isNightMode();
        this.b = viewGroup;
        viewGroup.findViewById(com.ss.android.article.browser.R.id.ad_layout);
        this.mContentsWrapper = arg5.findViewById(com.ss.android.article.browser.R.id.contents_wrapper);
        this.mSofaLayout = arg5.findViewById(com.ss.android.article.browser.R.id.sofa_layout);
        this.mSofaText = this.mSofaLayout.findViewById(com.ss.android.article.browser.R.id.sofa_text);
        com.ss.android.article.base.feature.detail2.config.a.b(this.b);
    }

    public final void a(Article article) {
        if(this.mArticleInfo == null || article == null || this.mArticleInfo.itemId != article.groupId) {
            this.mSofaLayout.setVisibility(View.GONE);
        }
    }

    public final void a(boolean arg3) {
        View v1 = this.mSofaLayout;
        int v0 = arg3 ? View.VISIBLE : View.GONE;
        v1.setVisibility(v0);
    }
}

